<?php 

class AuthController extends Controller{
	public function __construct()
	{
		parent::__construct();
		if (!$this->checkUser()) {
			$this->error('请登录后再操作',U('Login/login'));
			exit;
		}
	}
	//检测登录
	public function checkUser()
	{
		return isset($_SESSION['user']) && isset($_SESSION['user']['uid']);
	}
}


 ?>